gui/tray: Remove unused thumbnailjob class
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 28 Feb 2025 07:57:26 +0000 (15:57 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 3 Mar 2025 13:25:56 +0000 (13:25 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/CMakeLists.txt
src/gui/thumbnailjob.cpp [deleted file]
src/gui/thumbnailjob.h [deleted file]
src/gui/tray/usermodel.cpp

index d999868509a2a7c3e5eac2ebbfe639e51d4e1367..2bfa004dd7fa3e44829001ea6ec1d075d7628ed9 100644 (file)
@@ -148,8 +148,6 @@ set(client_SRCS
     systray.h
     systray.cpp
     EncryptionTokenSelectionWindow.qml
-    thumbnailjob.h
-    thumbnailjob.cpp
     userinfo.h
     userinfo.cpp
     vfsdownloaderrordialog.h
diff --git a/src/gui/thumbnailjob.cpp b/src/gui/thumbnailjob.cpp
deleted file mode 100644 (file)
index 81d6312..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
-
-#include "thumbnailjob.h"
-#include "networkjobs.h"
-#include "account.h"
-
-namespace OCC {
-
-ThumbnailJob::ThumbnailJob(const QString &path, AccountPtr account, QObject *parent)
-    : AbstractNetworkJob(account, QLatin1String("index.php/apps/files/api/v1/thumbnail/150/150/") + path, parent)
-{
-    setIgnoreCredentialFailure(true);
-}
-
-void ThumbnailJob::start()
-{
-    sendRequest("GET", makeAccountUrl(path()));
-    AbstractNetworkJob::start();
-}
-
-bool ThumbnailJob::finished()
-{
-    emit jobFinished(reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), reply()->readAll());
-    return true;
-}
-}
diff --git a/src/gui/thumbnailjob.h b/src/gui/thumbnailjob.h
deleted file mode 100644 (file)
index aa4fe62..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
-
-#ifndef THUMBNAILJOB_H
-#define THUMBNAILJOB_H
-
-#include "networkjobs.h"
-#include "accountfwd.h"
-
-namespace OCC {
-
-/**
- * @brief Job to fetch a thumbnail for a file
- * @ingroup gui
- *
- * Job that allows fetching a preview (of 150x150 for now) of a given file.
- * Once the job has finished the jobFinished signal will be emitted.
- */
-class ThumbnailJob : public AbstractNetworkJob
-{
-    Q_OBJECT
-public:
-    explicit ThumbnailJob(const QString &path, AccountPtr account, QObject *parent = nullptr);
-public slots:
-    void start() override;
-signals:
-    /**
-     * @param statusCode the HTTP status code
-     * @param reply the content of the reply
-     *
-     * Signal that the job is done. If the statusCode is 200 (success) reply
-     * will contain the image data in PNG. If the status code is different the content
-     * of reply is undefined.
-     */
-    void jobFinished(int statusCode, QByteArray reply);
-private slots:
-    bool finished() override;
-};
-}
-
-#endif // THUMBNAILJOB_H
index e6ccd45e6eab1163f874e95e5cd85b5e43ee1745..65229590b3cad30ddc92ca7635e0b4caf5ad6fc2 100644 (file)
@@ -18,7 +18,6 @@
 #include "tray/unifiedsearchresultslistmodel.h"
 #include "tray/talkreply.h"
 #include "userstatusconnector.h"
-#include "thumbnailjob.h"
 
 #include <QDesktopServices>
 #include <QIcon>